﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.pp.processor.type.comm;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.pp.stmtformatter.type.comm
{
	// Token: 0x02000205 RID: 517
	public class CreateViewStmtFormatter : AbstractStmtFormatter
	{
		// Token: 0x0600120B RID: 4619 RVA: 0x00317B7B File Offset: 0x00315D7B
		public virtual void addParameterProcessor(AbstractProcessor p)
		{
			if (this.parameterListProcessors == null)
			{
				this.parameterListProcessors = new List<AbstractProcessor>();
			}
			this.parameterListProcessors.Add(p);
		}

		// Token: 0x0600120C RID: 4620 RVA: 0x00317B9C File Offset: 0x00315D9C
		protected internal override void doFormat(TCustomSqlStatement stmtArg)
		{
			TCreateViewSqlStatement tcreateViewSqlStatement = stmtArg as TCreateViewSqlStatement;
			this.runProcessor<TCreateViewSqlStatement>(this.SpecialProcessors, tcreateViewSqlStatement);
			if (tcreateViewSqlStatement.ViewAliasClause != null && tcreateViewSqlStatement.ViewAliasClause.ViewAliasItemList != null)
			{
				this.runProcessor<TViewAliasItemList>(this.parameterListProcessors, tcreateViewSqlStatement.ViewAliasClause.ViewAliasItemList);
			}
		}

		// Token: 0x040013D8 RID: 5080
		private IList<AbstractProcessor> parameterListProcessors;
	}
}
